# coding:utf-8

import time
from selenium import webdriver
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
import requests

import urllib

## 进入jwc接口
url = 'http://jwc.csuft.edu.cn/'
binary = FirefoxBinary('D:\\program files (x86)\\Mozilla Firefox\\firefox.exe')
driver = webdriver.Firefox(firefox_binary=binary,executable_path='G:\webdriver\geckodriver.exe')
driver.get(url)
driver.maximize_window()
print('进入'+driver.title+'成功')

for link in driver.find_elements_by_tag_name("a"):
    if link.text!="":
        print link.text+":"
    else:
        print "未命名链接："
    print link.get_attribute("href")

driver.quit()